use master
go
create database house
on
(
name='house',
filename='D:\SQLwork4\house.mdf',
size=5mb,
maxsize=50mb,
filegrowth=10%
)
log on
(
name="house_log",
filename='D:\SQLwork4\house_log.ldf',
size=5mb,
maxsize=50mb,
filegrowth=10%
)
create table tblUse 
(
 
 userid int not null  primary key identity(1,1),
 userName varchar(10) not null ,
 userTel int not null unique,
)
create table tblHouseType
(
 typeid int not null primary key identity(1,1) ,
 typName int not null 

)
create table tblQx
(
qxld int  not null unique,
qxName int not null unique,
)
create table tblHouseinfo
(
tblid varchar(10) not null,
userld int foreign key references tblUse(userid),
typeld int foreign key references tblHouseType(typeid),

)